<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
</head>

<body>
  <script>
    // 利用new Object()
    const obj = new Object()  // 创建了一个空对象
    console.log(obj)
    obj.name = 'jack'
    obj.age = 3
    obj.dance = function () {
      console.log('会社会摇')
    }
    console.log(obj)
    const p = new Object({ name: 'tom', age: 18 })
    console.log(p)

        // const obj = {}  // ==> const obj = new Object()
        // const arr = []  // ==> const arr = new Array()
  </script>
</body>

</html>